/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.meanzoft.m3d.model.m3dmodel;

import java.util.LinkedList;
import org.lwjgl.util.vector.Vector2f;
import org.lwjgl.util.vector.Vector3f;

/**
 *
 * @author Meanz
 */
public class ModelData {

    private LinkedList<Vertex> vertices = new LinkedList<Vertex>();
    private LinkedList<Vector2f> textureCoordinates = new LinkedList<Vector2f>();
    private LinkedList<Vertex> normals = new LinkedList<Vertex>();

    public void addVertex(Vector3f vector) {
        vertices.add(new Vertex(vector));
    }

    public void addVertex(float x, float y, float z) {
        vertices.add(new Vertex(x, y, z, 0f));
    }

    public void addVertex(Vertex vertex) {
        vertices.add(vertex);
    }

    public void addTexCoord(Vector2f vector) {
        textureCoordinates.add(vector);
    }
    
    public void addTexCoord(float u, float v) {
        textureCoordinates.add(new Vector2f(u, v));
    }
    
    public void addNormal(Vector3f vector) {
        normals.add(new Vertex(vector));
    }

    public void addNormal(float x, float y, float z) {
        normals.add(new Vertex(x, y, z, 0f));
    }

    public void addNormal(Vertex vertex) {
        normals.add(vertex);
    }    

    /**
     * Getting and setting
     */
    public LinkedList<Vertex> getNormals() {
        return normals;
    }

    public void setNormals(LinkedList<Vertex> normals) {
        this.normals = normals;
    }

    public LinkedList<Vector2f> getTextureCoordinates() {
        return textureCoordinates;
    }

    public void setTextureCoordinates(LinkedList<Vector2f> textureCoordinates) {
        this.textureCoordinates = textureCoordinates;
    }

    public LinkedList<Vertex> getVertices() {
        return vertices;
    }

    public void setVertices(LinkedList<Vertex> vertices) {
        this.vertices = vertices;
    }
}
